//
//  NSAttributedString+RWAdditions.m
//  Alumna
//
//  Created by ray on 2021/11/15.
//

#import "NSAttributedString+RWAdditions.h"

@implementation NSAttributedString (RWAdditions)

+ (NSAttributedString *)rw_attributedString:(NSString *)str font:(UIFont *)font color:(UIColor *)color {
    if (str == nil || str.length == 0) { return nil;}
    font = font ? font : [UIFont systemFontOfSize:14];
    NSDictionary *dict = @{ NSFontAttributeName: font, NSForegroundColorAttributeName: color };
    return [[NSAttributedString alloc] initWithString:str attributes:dict];
}

@end
